/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package restAPI;

import internalAPI.Query;
import org.restlet.Response;
import org.restlet.data.MediaType;
import org.restlet.data.Status;
import org.restlet.resource.Delete;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
import org.restlet.resource.Put;
import org.restlet.resource.ServerResource;

/**
 *
 * @author ferco
 * Class representing resource for abysses
 */
public class AbyssesResource extends Resource{
    
   @Get
    @Override
    public void getXML() {  
        
        Query query = new Query();
        query.setType(Query.ObjectType.ABYSS);
        
        String message = RestAPI.executor.processQuery(query);       
       
        Response.getCurrent().setEntity(message, MediaType.TEXT_XML);  
        Response.getCurrent().setStatus(Status.SUCCESS_OK); 
    }
    
}
